﻿using System;

namespace codeparser.net.v2.Entities
{
    /// <summary>
    /// Represents a token.
    /// </summary>
    internal class Token
    {
        /// <summary>
        /// Gets or sets the token type.
        /// </summary>
        /// <value>The token type.</value>
        internal TokenType Type
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the tag.
        /// </summary>
        /// <value>The tag.</value>
        internal Tag Tag
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        internal string Value
        {
            get;
            set;
        }

        /// <summary>
        /// Initializes a new instance of the Token type.
        /// </summary>
        internal Token()
            : this(TokenType.Unknown)
        {
        }

        /// <summary>
        /// Initializes a new instance of the Token type.
        /// </summary>
        /// <param name="type">The type.</param>
        internal Token(TokenType type)
        {
            // Initialize the fields.
            this.Type = type;
            this.Value = "";
        }
    }
}